﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<WRSManagementSystem.DomainModel.Entities.Task>>" %>
<%@ Import Namespace="WRSManagementSystem.DomainModel.Entities" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Report
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Raport</h2>

    <table>
        <tr>
            <th></th>
            <th>
                Nazwa
            </th>
            <th>
                Opis
            </th>
            <th>
                Początek
            </th>
            <th>
                Koniec
            </th>
            <th>
                Aktywne
            </th>
        </tr>

    <%
        foreach (var item in Model)
        {%>
    
        <tr>
            <td>
                <%=Html.ActionLink("Edytuj", "../Task/Edit", new {id = item.Id})%> |
                <%=Html.ActionLink("Szczegóły", "../Task/Details", new {id = item.Id})%>
            </td>
            <td>
                <%=Html.Encode(item.Name)%>
            </td>
            <td>
                <%=Html.Encode(item.Description)%>
            </td>
            <td>
                <%=Html.Encode(String.Format("{0:g}", item.StartDate))%>
            </td>
            <td>
                <%=Html.Encode(String.Format("{0:g}", item.EndDate))%>
            </td>
            <td>
                <%=Html.Encode(item.IsActive)%>
            </td>
        </tr>
    
    <%
        }%>

    </table>
    <div>
        <%=Html.ActionLink("Powrót do listy", "../Task/Index")%>
    </div>
</asp:Content>
